<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>查看日程</title>

    <div th:include="commons :: comhead"></div>
</head>


<body class="sticky-header">

<section>
    <div th:replace="commons :: #left"></div>
    <!-- main content start-->
    <div class="main-content" >

        <!-- header section start-->
        <div th:replace="commons :: #search"></div>
        <!-- header section end-->

        <!-- page heading start-->
        <div class="page-heading">
            <h3>
                日程
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">主页</a>
                </li>
                <li>
                    <a href="#">日程管理</a>
                </li>
                <li class="active">查看日程</li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <div class="wrapper">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading">
                            日程表
                            <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
                     </span>
                        </header>
                        <div class="panel-body">
                            <div class="adv-table editable-table ">
                                <div class="clearfix">

                                    <div class="btn-group pull-right">
                                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">状态 <i class="fa fa-angle-down"></i>
                                        </button>
                                        <ul class="dropdown-menu pull-right">
                                            <li><a th:href="@{/getbyfinish(is_finish=0)}">未完成</a></li>
                                            <li><a th:href="@{/getbyfinish(is_finish=1)}">已完成</a></li>
                                            <li><a th:href="@{/getbyfinish(is_finish=2)}">超时</a></li>
                                            <li><a th:href="@{/getbyfinish(is_finish=3)}">所有</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="space15"></div>
                                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                                    <thead>
                                    <tr align="center">
                                        <th>编号</th>
                                        <th>日程负责人</th>
                                        <th>日成创建时间</th>
                                        <th>日程有效时间</th>
                                        <th>日程内容</th>
                                        <th>是否完成</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="" th:each="list,sta:${list}" align="center">
                                        <td th:text="${sta.count}"></td>
                                        <td th:text="${list.ename}"></td>
                                        <td th:text="${#dates.format(list.createTime,'yyyy-MM-dd HH:mm')}"></td>
                                        <td th:text="${list.validity} + '天'" id="validity"></td>
                                        <td class="center" th:text="${list.content}"></td>
                                        <td th:text="${list.isFinish}"></td>
                                        <td>
                                            <a class="" th:href="@{/ensurefinish(id=${list.scId})}" th:if="${list.isFinish==0}">确认完成</a>&nbsp;&nbsp;&nbsp;
                                            <a style="pointer-events: none" class="" th:if="${list.isFinish==1}">已完成</a>&nbsp;&nbsp;&nbsp;
                                            <a style="pointer-events: none" class="" th:if="${list.isFinish==2}">已过期</a>&nbsp;&nbsp;&nbsp;
                                            <a class="" th:href="@{/delete_schdule(id=${list.scId})}" th:if="${session.user.id == 1}">删除</a>
                                            <a class="" th:if="${session.user.id == 0}"></a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            2020 &copy; AdminEx by ThemeBucket </a>
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>

<!--data table-->
<script type="text/javascript" src="js/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>

<!--common scripts for all pages-->
<script src="js/scripts.js"></script>

<!--script for editable table-->
<script src="js/editable-table.js"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
</script>
</body>
</html>
